<?php $this->load->view('teacher_home/_header') ?>
<?php $this->load->view('message') ?>
<head>
<script tyep="text/javascript">
  $().ready(function(){
    $("#student_li").addClass("active");   
  });

</script>
 <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
    <div id="main" style="height:400px"></div>
    <!-- ECharts单文件引入 -->
    <script type="text/javascript" src="<?php echo base_url()?>js/echarts-2.2.7/build/dist/echarts-all.js"></script>
    
    <script type="text/javascript">
        // 基于准备好的dom，初始化echarts图表
        var myChart = echarts.init(document.getElementById('main')); 
        
        var option = {
    title : {
        text: '某站点用户访问来源',
        subtext: '纯属虚构',
        x:'center'
    },
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    legend: {
        orient : 'vertical',
        x : 'left',
        data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
    },
    toolbox: {
        show : true,
        feature : {
            mark : {show: true},
            dataView : {show: true, readOnly: false},
            magicType : {
                show: true, 
                type: ['pie', 'funnel'],
                option: {
                    funnel: {
                        x: '25%',
                        width: '50%',
                        funnelAlign: 'left',
                        max: 1548
                    }
                }
            },
            restore : {show: true},
            saveAsImage : {show: true}
        }
    },
    calculable : true,
    series : [
        {
            name:'访问来源',
            type:'pie',
            radius : '55%',
            center: ['50%', '60%'],
            data:[
                {value:335, name:'直接访问'},
                {value:310, name:'邮件营销'},
                {value:234, name:'联盟广告'},
                {value:135, name:'视频广告'},
                {value:1548, name:'搜索引擎'}
            ]
        }
    ]
};
                    
                    
        // 为echarts对象加载数据 
        myChart.setOption(option); 
    </script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    </head>
<div class="container">
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">查看学生信息</h3>
        </div>
        <div class="panel-body">
            <fieldset>
                    <div class="form-group">
                        <label class="col-lg-2 control-label">姓名:</label>
                        <div class="col-lg-10">
                            <p ><?=$student['name']?></p>
                        </div>

                    </div>


                    <div class="form-group">
                        <label class="col-lg-2 control-label">学号:</label>
                        <div class="col-lg-10">
                            <p ><?=$student['student_id']?></p>
                        </div>
                        
                    </div>
                    
                    <div class="form-group">
                        <label class="col-lg-2 control-label">专业:</label>
                        <div class="col-lg-10">
                            <p ><?=$student['major_name']?></p>
                        </div>
                        
                    </div>
                    
                    <div class="form-group">
                        <label class="col-lg-2 control-label">班级:</label>
                        <div class="col-lg-10">
                            <p ><?=$student['class_name']?></p>
                        </div>
                        
                    </div>

                    <div class="form-group">
                        <label class="col-lg-2 control-label">用户类型:</label>
                        <div class="col-lg-10">
                            <?php if ($student['type']==1): ?>
                                <p>本校用户</p>
                            <?php elseif ($student['type']==2): ?>
                                <p>注册用户</p>
                            <?php endif ?>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-lg-2 control-label">已选课程:</label>
                        <div class="col-lg-10">
                            <table class="table table-striped table-hover ">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>课程名称</th>
                                        <th>逻辑班号</th>
                                        <th>任课老师</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $index=1; ?>
                                    <?php foreach ($relative_logic_classes as $item ): ?>
                                    <tr>
                                        <td>
                                            <?php echo $index++ ;?></td>
                                        <td>
                                            <?php echo $item['lecture_name']?></td>
                                        <td>
                                            <?php echo $item['number']?></td>
                                        <td>
                                            <?php echo $item['teacher_name']?></td>
                                    </tr>
                                    <?php endforeach; ?></tbody>
                            </table>
                            
                        </div>
                        
                    </div>
                    <div class="form-group">
                        <label class="col-lg-2 control-label"></label>
                        <div class="col-lg-10">
                            
                            <a class="btn btn-primary" href="<?php echo site_url('teacher_student/check_class').'/'.$before_logic_class_id.'/'.$before_class_id?>">返回</a>
                        </div>
                        
                    </div>
                    
                </fieldset>

        </div>
    </div>
</div>
<?php $this->load->view('admin_home/_footer')?>